import java.util.Scanner;
public class Main {
    public int fac(int n){  // 求每个数的阶乘的方法
        int c = 1;
        for (int i = 1; i <= n; i++) {
            c*=i;
        }
        return c;
    }
    public static void main(String[] args) {
        Main main = new Main();
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
         int fac = 0;
        for (int i = 1; i <= n; i++){
            fac = main.fac(i);
            sum+=fac;
            if(i==1){
                System.out.print(i+"!");
            }else {
                System.out.print("+" + i + "!");
            }
        }
        System.out.println("="+sum);
    }
}